import request from '@/utils/request'

//今日销售额
export function getTodaySales() {
  return request({
    url: '/homes/todaySales',
    method: 'get'
  })
}
//昨日销售额
export function getYesterdaySales() {
  return request({
    url: '/homes/yesterdaySales',
    method: 'get'
  })
}
//今日订单数
export function getTodayOrders() {
  return request({
    url: '/homes/todayOrders',
    method: 'get'
  })
}
//昨日订单数
export function getYesterdayOrders() {
  return request({
    url: '/homes/yesterdayOrders',
    method: 'get'
  })
}
//用户数量
export function getTotalUsers() {
  return request({
    url: '/homes/totalUsers',
    method: 'get'
  })
}
//商品数量
export function getGoodsCount() {
  return request({
    url: '/homes/goodsCount',
    method: 'get'
  })
}
//订单趋势分析分布图
export function getSalesTrend(type) {
  return request({
    url: `/homes/salesTrend/${type}`,
    method: 'get'
  });
}
//订单状态分布饼状图
export function getOrderStatus() {
  return request({
    url: `/homes/orderStatus`,
    method: 'get'
  });
}
//热门商品销售排行
export function getHotGoods() {
  return request({
    url: `/homes/hotGoods`,
    method: 'get'
  });
}
//商品类目数量
export function getGoodsType() {
  return request({
    url: `/homes/goodsType`,
    method: 'get'
  });
}
